home *** CD-ROM | disk | FTP | other *** search
/ LOGIC Apps / Logic-APPLE_II_APPS.iso / mac / LOGIC Apple II 5.25" Library - ProDOS / PRO086B.dsk / WARP6.DOC.txt < prev    next >
Text File  |  2012-02-16  |  15KB  |  422 lines

  1. Warp Six BBS Documentation
  2.  
  3. Updated September 4, 1989
  4.  
  5. Copyright 1989 Jim Ferr
  6. All rights reserved.
  7.  
  8.  
  9. Table of Contents
  10.  
  11. 1) File Specifications
  12. 2) Machine Language Routines Specifications
  13. 3) Making customizations to the drivers
  14. 4) Programming Considerations
  15.      Getting Input
  16.      Output
  17.      Summary
  18.      Notes
  19. Appendix A: Local Commands
  20.  
  21.  
  22. 1) File Specifications
  23.  
  24.  
  25. (ROOT DIRECTORY)
  26.  
  27. STARTUP - a BASIC program that executes the Warp6.Loader and runs LOGON.
  28. WARP6.LOADER - loads the driver, allocates interrupt handler, sets vectors
  29.                and turns on the 80 column card if one is present.
  30. WARP6.DRIVER - the input/output driver, called from BASIC.
  31. MODEM.INIT - a one or more line text file to initialize the modem
  32. LOGON - a BASIC program that sets up all variables, waits for calls and
  33.         handles logon procedures.
  34. WARP6.BBS - the BBS itself, including main command level, forums and E-mail.
  35. SYSOP.UTIL - sysop utilities
  36. ADD.A.FORUM - CHAINed from Sysop.Utilities
  37. USER.PURGE - CHAINed from Warp6.BBS
  38. ADD.USER - CHAINed from LOGON to sign up new users
  39. FILER - CHAINed from Warp6.BBS to handle file sections
  40. UPLOADER - CHAINed from Warp6.BBS to handle text uploads
  41. AWORKS.CONVERT - a stand-alone utility to convert the USERS file to a standard
  42.                  text file that AppleWorks can read. (17 fields per record)
  43. BKUP.STARTUP - a BASIC program you should install on a ProDOS boot disk on your
  44.                the floppy disk your system will boot from in case of power
  45.                failure.
  46. SET.TO.40COL - a text file you can EXEC to modify LOGON for 40 column display
  47.                if you don't have an 80 column card installed.
  48. UCASE - A UTILITY TO CONVERT APPLESOFT PROGRAMS TO ALL UPPERCASE
  49. UCASE.DOC - DOCS FOR ABOVE
  50.  
  51. Other important files:
  52.  
  53. Bytes per field in parentheses ()
  54.  
  55. USERS, type TXT   Record Length=135
  56.  
  57. ID/UI     User ID number. Always R+1000. (5)
  58. PW$/UP$   Password (8)
  59. N1$/N3$   First Name (16)
  60. N2$/N4$   Last Name (21)
  61. A1$/A3$   City (20)
  62. A2$/A4$   Province/State/Country (3)
  63. PH$/TE$   Phone number, nnn-nnn-nnnn (13)
  64. DV$/VD$   Date Validated (10)
  65. LD$/DL$   Date Last on (10)
  66. LT$/TL$   Time last on (5)
  67. TD/DT     calls today (2)
  68. SL/US     Security Level (0-9) defined: (2)
  69.  0 = unvalidated/guest
  70.  1 = devalidated
  71.  2 = validated user
  72.  3 = regular contributor
  73.  4-9 = future use
  74. MT/UT     Machine Type. defined: (2)
  75.  0 = undefined
  76.  1 = Apple // or compatible
  77.  2 = Macintosh, Mac XL or Mac Plus
  78.  3 = IBM or compatible
  79.  4 = Other
  80. BP/UP     Bulletins posted  (5)
  81. ME/MB     Membership flag, 0=off, 1=on (2)
  82. TM/UM     Total Mail waiting (3)
  83. TC/TK     Total Calls made (5)
  84.  
  85. Per Record Total: 17 fields, 132 bytes, 2 spare, 1 for EOR.
  86.  
  87. REC.DATA, type TXT
  88.  
  89. LR    Last Record used in USERS file
  90. RN    Reference number of last bulletin
  91.       posted in system (10000-99999)
  92.  
  93. SYS.DATA, type TXT
  94.  
  95. RT$   Root Pathname for system
  96. FP$   Forum dir pathname
  97. EP$   Email dir pathname
  98. SN$   System Name
  99. SP$   Copyright message or system sponsor
  100. RP$   Remote (Sysop) Password
  101. HR$   Hours/baud rate message
  102. AB$   abort string (Control-S to pause...)
  103. CS    Clock slot
  104. FC    Forum Count: total # of forums
  105. CD$   Current date in ProDOS format
  106. CT    Call Total for System
  107.  
  108. MODEM.INIT     Holds initialization strings for the modem. Two is the
  109.                maximum recommended. See Modem.Doc for details.
  110.  
  111. LOG
  112. N1$+" "+N2$ User first and last name
  113.  
  114. LOG.REC
  115. Y      Holds total number of users in LOG.
  116.  
  117.  
  118. ERROR.LOG
  119. Log of errors in operation
  120.  
  121. UNVALIDATED
  122. TYPED to unvalidated callers
  123.  
  124. DEVALIDATED
  125. TYPED to devalidated callers
  126.  
  127. NEW.INFO
  128. Info message to NEW callers
  129.  
  130. DUPLICATE
  131. TYPED if new user enters duplicate name
  132.  
  133. REJECT.USER
  134. Used in the event of an error in Add.User
  135.  
  136. AGREEMENT
  137. TYPED to all new users
  138.  
  139. BAD.ID
  140. TYPED if bad ID number entered twice
  141.  
  142. SYS.NEWS
  143. TYPED to all callers at logon.
  144.  
  145. MAIN.MENU
  146. Main Menu, TYPED at '?' command
  147.  
  148. SYS.MENU
  149. Sysop Menu, TYPED after MAIN.MENU
  150.  
  151. SYSTEM.MENU
  152. Sysop.Util menu
  153.  
  154. FORUM.NAMES
  155. TYPED menu (numbered) of forum names
  156.  
  157. FORUM.HELP
  158. TYPED list of Forum Commands
  159.  
  160. EDIT.HELP
  161. TYPED list of Edit Commands
  162.  
  163. READ.HELP
  164. TYPED when caller hits ? at read prompt
  165.  
  166. ABOUT.US
  167. About your BBS. From main menu.
  168.  
  169. (FORUM DIRECTORIES)
  170.  
  171. OPENER
  172. This file is TYPED upon entry into a forum
  173.  
  174. F.DATA
  175. FM$   Forum name
  176. ES    Entry security (min.) 0-9
  177. WS    Write security (min.) 0-9
  178. MO    Members only flag (0-1)
  179. BL    Bulletin limit
  180. FD    First bulletin to delete at limit
  181. TT    Total Titles in forum
  182. LB    refnum of last msg. posted in this forum
  183.  
  184. U.DATA            TXT   L=6     RL    last bulletin read by each user, indexed
  185.                                       by record number where R=ID-1000
  186.  
  187. GEN DIRECTORY
  188.  
  189. F.DATA    Holds name of file section and number of sub-sections
  190. TITLES    Menu of sub-sections
  191. Fn        Subdirectories F1 to Fwhatever hold actual general files
  192.  
  193. GEN/Fn DIRECTORIES
  194.  
  195. F.DATA    Holds name of section and number of files
  196. TITLES    Holds menu of files
  197. Fn        Files F1 to Fwhatever are the files themselves.
  198.  
  199. TITLES
  200.  
  201. TI$(X) where X is TT
  202. Titles are in the following format:
  203. "B"+"."+STR$(ID)+"."+STR$(RN)+MID$(SU$,8)
  204. Eg. B.1000.15844This is the title
  205.  
  206. BULLETINS
  207. Bulletins are stored as text and TYPED.
  208. Example of bulletin filename: B.1000.10437
  209. The first few fields compose the bulletin
  210. header. The FROM field is INPUT into memory
  211. for the Post reply feature.
  212.  
  213. EMAIL
  214. Similar to bulletins, but filenames are M.1000.1 where 1000 is the
  215. ID number and 1 is the letter number.
  216.  
  217.  
  218. 2) Warp6 Machine Language Routines Specifications
  219.  
  220. WARP6.DRIVER contains the following routines:
  221.  
  222. M/L NAME     BASIC NAME    FUNCTION
  223.  
  224. INIT         M1            Sets up all M/L flags and variables.
  225. GETCALL      M2            Waits for call or local command.
  226. GETLN        M3            This is the line input routine.
  227. LOGON        M4            Called at connect to save starting time.
  228. GETTIME      M5            Updates ProDOS date and time if clock.
  229. HANGUP       M6            Drops DTR to hangup, and disables interrupts.
  230. CLRMBUF      M7            Clears the modem buffer of data.
  231. INIT2        M0            Set up modem by sending MODEM.INIT file to modem
  232.  
  233. All the above routines are vectored, so their locations will not change with
  234. minor revisions to the driver programs. To activate a routine, just CALL it,
  235. for example CALL M6 to hangup. Note that the user's elapsed time is
  236. continually updated (each time the user presses RETURN, actually).
  237. (The locations of these routines are defined in LOGON near the beginning.)
  238.  
  239. 3) Making Customizations to the live drivers
  240.  
  241. There are a few things you can do to change the live drivers. If your cpu
  242. is faster than the standard 1Mhz Apple IIe or IIc, you should change the
  243. timeout values using POKEs. You can put these at the beginning of the LOGON
  244. program (before line 100), or you can patch the driver of your choice
  245. permanently.
  246.  
  247. Here are the timeout counters you can change, and their locations:
  248.  
  249. Name      Hex       Decimal   Default   Description
  250.                               (decimal)
  251.  
  252. TMOUT     $8F2F     36665     21        Defines how long to wait for input
  253.                                         before sending warning and hanging up.
  254.                                         Default is about 3 minutes.
  255.  
  256. OTMOUT    $8F33     36659     38        Defines how long to wait for Xon
  257.                                         after user pressed Control-S to pause.
  258.                                         Default is about 3 minutes.
  259.  
  260. OKCHECK   $8F37     36663      7        Defines how often the driver checks
  261.                                         the modem. Default about every 30 secs.
  262.  
  263. INTMOUT   $8F38     36664      6        Defines the initial timeout when a
  264.                                         caller first logs on. About 30 secs.
  265.  
  266. DEFBAUD   $8F3C     36668      3        1=300, 2=1200, 3=2400
  267. DELAY1B   $8F3D     36669      5        Counter to pause 1 sec on 1Mhz system
  268.  
  269. To change a timeout value, use the POKE statement (POKE LOCATION,VALUE), for
  270. example POKE 36659,55. The values must be within 1 and 255 to be valid. Be
  271. careful when changing these values.
  272.  
  273. With version 3.03, the BASE address (address of M1) is predefined in LOGON
  274. as BA. To change the default baud rate to 1200 baud, use POKE BA+49,2.
  275. DEFBAUD is at BASE + 49, or 36619 + 49 = 36668. The same method can be
  276. applied to any values above. The advantage to you is that if another driver
  277. is released, you just change the value of BA, not POKEs located all over
  278. the program.
  279.  
  280. To make a permanent change, exit to BASIC from the BBS using the + command at
  281. the main menu. (Changes will affect your live driver.) Then do a ProDOS disk
  282. CATALOG and take note of the length of the driver you are using. Use CALL-151
  283. to get into the monitor and type 8F37: 1F and press Return (for example) to
  284. change a value. To get back into BASIC to save, use Control-C Return. Then use
  285. BSAVE WARP6.DRIVER,A$8F00,Lnnnn where L is the decimal length you took note of
  286. in the catalog earlier.
  287.  
  288. There are a few other changes you can make, if you are ambitious. All text
  289. strings are terminated with a hex zero. If you change a string, you must
  290. leave it the same size and leave the zero byte intact. (Program execution
  291. continues after the hex zero byte.)  Further changes than this are not
  292. recommended. If you make a change to a string and decrease its size, you
  293. must put in spaces before the 0 byte, or NOP's after it. A No-Op is a
  294. hexidecimal EA.
  295.  
  296. 4) Programming Considerations
  297.  
  298. If you are a glutton for punishment, you can make modifications to the
  299. system. Just keep in mind the following caveats. Have a backup copy of the
  300. original unmodified program in a safe place. Make another backup of the program
  301. on another disk before every change you make. Test all changes thoroughly for
  302. unexpected bugs before subjecting them to your users.
  303.  
  304. To make a major addition you should write additional programs which can either
  305. be run or CHAINed from the main program. A good example of this technique is
  306. the SYSOP.UTIL program. There is more information on common modifications in
  307. the Sysop.Doc file.
  308.  
  309. And now for some details.
  310.  
  311. Getting Input
  312.  
  313. Before getting input, do the following:
  314.  
  315. POKE VI,x, where x is the maximum length of characters you want to accept. A
  316. value of zero will only accept a carriage return. The video width is preset to
  317. 80 columns - 2, and is stored in VW.
  318.  
  319. POKE UC,0 to enable full upper and lower case.
  320.  
  321. POKE UC,255 to convert characters in range a-z to uppercase.
  322.  
  323. POKE MD,255 to echo asterisks when taking input. (This is the hidden mode,
  324. and is generally used to take password input. Hidden mode is automatically
  325. shut off when the user presses RETURN.
  326.  
  327. CALL M7 to clear the modem buffer if you wish. Most times this is not
  328. desirable.
  329.  
  330. PRINT a prompt, for example PRINT:PRINT"Enter your name : ";
  331. (Note the semicolon. It is necessary to suppress the carriage return in
  332. your prompt.)
  333.  
  334. Note that the options above (except for the MODE flag) will remain as you
  335. last set them, so it is not always necessary to do each poke.
  336.  
  337. After setting the above options, do a GOSUB 100 to get a line of input with
  338. time limit active. If the user is out of time, he will be logged off. If he
  339. has five minutes or less time remaining, and he hasn't already been warned,
  340. he will be. Do GOSUB 130 to get a line of input with time limit ignored.
  341.  
  342. When control returns, the input will be in I$. If CR=1 then the user pressed
  343. RETURN. Do a GOSUB 170 to check for commas, colons or dashes. Then if EE=1 the
  344. user did enter one of these, so do a GOSUB 190 to reject the input, and then
  345. GOTO the line requesting the input again.
  346.  
  347. It is possible control will not return after a GOSUB 100 or 130 to get input,
  348. if the caller drops carrier (ie. hangs up) or a control-K (kill command) is
  349. issued from the console. The input routine will automatically branch to the
  350. logoff code if this happens. The system is designed to fully recover after
  351. any premature disconnection, and will fully save the users stats before
  352. getting another call.
  353.  
  354.  
  355. Output
  356.  
  357. As already mentioned, you can simply use PRINT statements to send output. In
  358. addition, there is the built-in TYPE command, which will read standard ASCII
  359. text files (with high bit set or clear) to the current output.
  360.  
  361. Eg. PRINT D$"TYPE MY.FILE" will dump the contents of MY.FILE, regardless of
  362. its contents.
  363.  
  364. IMPORTANT NOTE: DO NOT USE ANY PR# COMMANDS AS YOU WILL DISCONNECT THE
  365. OUTPUT ROUTINE THE SYSTEM USES TO SEND DATA TO THE MODEM.
  366.  
  367. You should never ever use in# and input to get user input. Use gosub 100 or
  368. 130 exclusively. Getting input via in# and 'input' would leave your system
  369. wide open to hackers in the unlikely event of a crash. The machine language
  370. input routines must be called to get input. This provides the ultimate in
  371. security for your system: in the event the system crashes, the remote user
  372. can't input anything.
  373.  
  374.  
  375. There is only one output option: the private flag. If you do a POKE PF,255
  376. before sending output, the output will only go to the modem (if active). A
  377. POKE PF,0 reverses this condition. The system uses the private flag to ensure
  378. E-mail is not displayed on the console screen. Thus you as sysop cannot read
  379. user mail unless you read it directly from disk, which is considered to be in
  380. extremely poor taste unless you display a prominent message telling users you
  381. will be scanning mail. Note that mail directed to the sysop WILL be displayed.
  382.  
  383.  
  384. Summary
  385.  
  386. The program is written in a modular fashion, as a cursory glance at the program
  387. description will tell you. If you have questions, give me a call. If you decide
  388. to make a major improvement to your system, let me know so I can help. I would
  389. appreciate it if you can "donate" any major enhancements. Many people have
  390. helped along the evolution of the current system. Many improvements have been
  391. made to the system, some of which may not have made it into this documentation.
  392.  
  393. Notes
  394.  
  395. To halt program execution hit Control-Reset. Control-C will merely cause an
  396. error #255, which will be trapped and logged by the system. Because the system
  397. uses interrupts for modem input, an interrupt handler is allocated. Use the
  398. Quit command (control-Q) to properly deallocate the interrupt handler and
  399. disable interrupts from the SSC.
  400.  
  401. Read your error log frequently. You shouldn't experience many errors in normal
  402. operation.
  403.  
  404.  
  405. APPENDIX A: Local commands
  406.  
  407. Active while awaiting a call:
  408.  
  409. Control-L :local logon/logoff toggle (hitting Ctrl-L while online is like
  410.            dropping carrier.
  411. Control-Q :quit program (disables interrupts, and removes handler)
  412.  
  413. Active while user online:
  414.  
  415. Control-A :activate/deactivate local keyboard for input
  416. (Used to enter information for an online user, eg. to give a guided tour.)
  417. Control-O :sysop online/offline toggle for chat
  418. Control-P :promote user one security level
  419. Control-D :demote user one security level
  420. Control-K :kill call (hangup on remote caller.) Displays "Killed."
  421. Control-W :warning - "1 minute left!"
  422.